import request from "@/utils/request.js";

/**
 * 门店列表
 */
export function storeMerchantList(data) {
    return request.get(`store/merchant/lst`, data, {
        noAuth: true
    });
}

/**
 * 门店详情
 */
export function storeMerchantDetails(data) {
    return request.get(`store/merchant/detail/${data.id}`, data, {
        noAuth: true
    });
}

/**
 * 桌号获取
 */
export function storeMerchantDeskList(data) {
    return request.get(`store/merchant/deskesklist/${data.id}`, data, {
        noAuth: true
    });
}

/**
 * 预订餐饮
 */
export function storeMerchantInsertMerchantReserve(data) {
    return request.post(`store/merchant/insert_merchant_reserve`, data, {
        noAuth: true
    });
}

/**
 * 门店菜单分类
 */
export function storeMerchantCategoryList(data) {
    return request.get(`store/merchant/category/lst/${data.id}`, data, {
        noAuth: true
    });
}

/**
 * 加入购物车
 */
export function userCartCreate(data) {
    return request.post(`user/cart/create`, data, {
        noAuth: true
    });
}


/**
 * 门店菜单列表
 * http://mer.crmeb.net/api/product/spu/merchant/215?mer_cate_id=544&order=&price_on=&price_off=&brand_id=&keyword=&page=1&limit=30
 */
export function productSpuMerchant(data) {
    return request.get(`product/spu/merchant/${data.id}`, data, {
        noAuth: true
    });
}

/**
 * 酒店列表接口
 * hotel/list?page=1&limit=2
 */
export function getHotelList(data) {
    return request.get(`hotel/list`, data, {
        noAuth: true
    });
}

/**
 * 店民宿详情接口
 */
export function getHotelInfo(data) {
    return request.get(`hotel/detail/${data.id}`, data, {
        noAuth: true
    });
}
